home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / OSUtils.a < prev    next >
Text File  |  1996-05-01  |  16KB  |  682 lines

  1. ;
  2. ;    File:        OSUtils.a
  3. ;
  4. ;    Contains:    OS Utilities Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  19. __OSUTILS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  25.     include 'MixedMode.a'
  26.     ENDIF
  27.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  28.     include 'Memory.a'
  29.     ENDIF
  30.     IF &TYPE('__PATCHES__') = 'UNDEFINED' THEN
  31.     include 'Patches.a'
  32.     ENDIF
  33.  
  34. useFree                            EQU        0
  35. useATalk                        EQU        1
  36. useAsync                        EQU        2
  37. useExtClk                        EQU        3                    ;Externally clocked
  38. useMIDI                            EQU        4                    ; Machine Types 
  39. envMac                            EQU        -1
  40. envXL                            EQU        -2
  41. envMachUnknown                    EQU        0
  42. env512KE                        EQU        1
  43. envMacPlus                        EQU        2
  44. envSE                            EQU        3
  45. envMacII                        EQU        4
  46. envMacIIx                        EQU        5
  47. envMacIIcx                        EQU        6
  48. envSE30                            EQU        7
  49. envPortable                        EQU        8
  50. envMacIIci                        EQU        9
  51. envMacIIfx                        EQU        11                    ; CPU types 
  52. envCPUUnknown                    EQU        0
  53.  
  54. env68000                        EQU        1
  55. env68010                        EQU        2
  56. env68020                        EQU        3
  57. env68030                        EQU        4
  58. env68040                        EQU        5                    ; Keyboard types 
  59. envUnknownKbd                    EQU        0
  60. envMacKbd                        EQU        1
  61. envMacAndPad                    EQU        2
  62. envMacPlusKbd                    EQU        3
  63. envAExtendKbd                    EQU        4
  64. envStandADBKbd                    EQU        5
  65. envPrtblADBKbd                    EQU        6
  66. envPrtblISOKbd                    EQU        7
  67. envStdISOADBKbd                    EQU        8
  68. envExtISOADBKbd                    EQU        9
  69. false32b                        EQU        0                    ;24 bit addressing error
  70. true32b                            EQU        1                    ;32 bit addressing error
  71.                                                             ; result types for RelString Call 
  72. sortsBefore                        EQU        -1                    ;first string < second string
  73. sortsEqual                        EQU        0                    ;first string = second string
  74. sortsAfter                        EQU        1                    ;first string > second string
  75.  
  76.                                                             ; Toggle results 
  77. toggleUndefined                    EQU        0
  78. toggleOK                        EQU        1
  79. toggleBadField                    EQU        2
  80. toggleBadDelta                    EQU        3
  81. toggleBadChar                    EQU        4
  82. toggleUnknown                    EQU        5
  83. toggleBadNum                    EQU        6
  84. toggleOutOfRange                EQU        7                    ;synonym for toggleErr3
  85. toggleErr3                        EQU        7
  86. toggleErr4                        EQU        8
  87. toggleErr5                        EQU        9                    ; Date equates 
  88. smallDateBit                    EQU        31                    ;Restrict valid date/time to range of Time global
  89. togChar12HourBit                EQU        30                    ;If toggling hour by char, accept hours 1..12 only
  90. togCharZCycleBit                EQU        29                    ;Modifier for togChar12HourBit: accept hours 0..11 only
  91. togDelta12HourBit                EQU        28                    ;If toggling hour up/down, restrict to 12-hour range (am/pm)
  92. genCdevRangeBit                    EQU        27                    ;Restrict date/time to range used by genl CDEV
  93. validDateFields                    EQU        -1
  94. maxDateField                    EQU        10
  95. eraMask                            EQU        $0001
  96. yearMask                        EQU        $0002
  97. monthMask                        EQU        $0004
  98. dayMask                            EQU        $0008
  99. hourMask                        EQU        $0010
  100. minuteMask                        EQU        $0020
  101. secondMask                        EQU        $0040
  102. dayOfWeekMask                    EQU        $0080
  103. dayOfYearMask                    EQU        $0100
  104. weekOfYearMask                    EQU        $0200
  105. pmMask                            EQU        $0400
  106. dateStdMask                        EQU        $007F                ;default for ValidDate flags and ToggleDate TogglePB.togFlags
  107.  
  108. eraField                        EQU        0
  109. yearField                        EQU        1
  110. monthField                        EQU        2
  111. dayField                        EQU        3
  112. hourField                        EQU        4
  113. minuteField                        EQU        5
  114. secondField                        EQU        6
  115. dayOfWeekField                    EQU        7
  116. dayOfYearField                    EQU        8
  117. weekOfYearField                    EQU        9
  118. pmField                            EQU        10
  119. res1Field                        EQU        11
  120. res2Field                        EQU        12
  121. res3Field                        EQU        13
  122. ; typedef SignedByte                     LongDateField
  123.  
  124.  
  125. dummyType                        EQU        0
  126. vType                            EQU        1
  127. ioQType                            EQU        2
  128. drvQType                        EQU        3
  129. evType                            EQU        4
  130. fsQType                            EQU        5
  131. sIQType                            EQU        6
  132. dtQType                            EQU        7
  133. nmType                            EQU        8
  134. ; typedef SignedByte                     QTypes
  135.  
  136. SysParmType                RECORD 0
  137. valid                     ds.b    1                ; offset: $0 (0)
  138. aTalkA                     ds.b    1                ; offset: $1 (1)
  139. aTalkB                     ds.b    1                ; offset: $2 (2)
  140. config                     ds.b    1                ; offset: $3 (3)
  141. portA                     ds.w    1                ; offset: $4 (4)
  142. portB                     ds.w    1                ; offset: $6 (6)
  143. alarm                     ds.l    1                ; offset: $8 (8)
  144. font                     ds.w    1                ; offset: $C (12)
  145. kbdPrint                 ds.w    1                ; offset: $E (14)
  146. volClik                     ds.w    1                ; offset: $10 (16)
  147. misc                     ds.w    1                ; offset: $12 (18)
  148. sizeof                     EQU *                    ; size:   $14 (20)
  149.                         ENDR
  150. ; typedef struct SysParmType *            SysPPtr
  151.  
  152. QElem                    RECORD 0
  153. qLink                     ds.l    1                ; offset: $0 (0)
  154. qType                     ds.w    1                ; offset: $4 (4)
  155. qData                     ds.w    1                ; offset: $6 (6) <-- really an array of length one
  156. sizeof                     EQU *                    ; size:   $8 (8)
  157.                         ENDR
  158. ; typedef struct QElem *                QElemPtr
  159.  
  160. QHdr                    RECORD 0
  161. qFlags                     ds.w    1                ; offset: $0 (0)
  162. qHead                     ds.l    1                ; offset: $2 (2)
  163. qTail                     ds.l    1                ; offset: $6 (6)
  164. sizeof                     EQU *                    ; size:   $A (10)
  165.                         ENDR
  166. ; typedef struct QHdr *                    QHdrPtr
  167.  
  168.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  169. DeferredTask            RECORD 0
  170. qLink                     ds.l    1                ; offset: $0 (0)
  171. qType                     ds.w    1                ; offset: $4 (4)
  172. dtFlags                     ds.w    1                ; offset: $6 (6)
  173. dtAddr                     ds.l    1                ; offset: $8 (8)
  174. dtParam                     ds.l    1                ; offset: $C (12)
  175. dtReserved                 ds.l    1                ; offset: $10 (16)
  176. sizeof                     EQU *                    ; size:   $14 (20)
  177.                         ENDR
  178. ; typedef struct DeferredTask *            DeferredTaskPtr
  179.  
  180.     ENDIF
  181. MachineLocation            RECORD 0
  182. latitude                 ds.l    1                ; offset: $0 (0)
  183. longitude                 ds.l    1                ; offset: $4 (4)
  184. dlsDelta                 ds.b    1                ; offset: $8 (8)        ;  signed byte; daylight savings delta 
  185.                          ORG 8
  186. gmtDelta                 ds.l    1                ; offset: $8 (8)        ;  use low 24-bits only 
  187. sizeof                     EQU *                    ; size:   $C (12)
  188.                         ENDR
  189. DateTimeRec                RECORD 0
  190. year                     ds.w    1                ; offset: $0 (0)
  191. month                     ds.w    1                ; offset: $2 (2)
  192. day                         ds.w    1                ; offset: $4 (4)
  193. hour                     ds.w    1                ; offset: $6 (6)
  194. minute                     ds.w    1                ; offset: $8 (8)
  195. second                     ds.w    1                ; offset: $A (10)
  196. dayOfWeek                 ds.w    1                ; offset: $C (12)
  197. sizeof                     EQU *                    ; size:   $E (14)
  198.                         ENDR
  199. LongDateTime            RECORD 0
  200. f                         ds        wide
  201. sizeof                     EQU *                    ; size:   $8 (8)
  202.                         ENDR
  203.  
  204.  
  205. LongDateCvt                RECORD 0
  206. c                         ds        wide            ; offset: $0 (0)
  207.                          ORG 0
  208. lHigh                     ds.l    1                ; offset: $0 (0)
  209. lLow                     ds.l    1                ; offset: $4 (4)
  210. sizeof                     EQU *                    ; size:   $8 (8)
  211.                         ENDR
  212. LongDateRec                RECORD 0
  213. era                         ds.w    1                ; offset: $0 (0)
  214. year                     ds.w    1                ; offset: $2 (2)
  215. month                     ds.w    1                ; offset: $4 (4)
  216. day                         ds.w    1                ; offset: $6 (6)
  217. hour                     ds.w    1                ; offset: $8 (8)
  218. minute                     ds.w    1                ; offset: $A (10)
  219. second                     ds.w    1                ; offset: $C (12)
  220. dayOfWeek                 ds.w    1                ; offset: $E (14)
  221. dayOfYear                 ds.w    1                ; offset: $10 (16)
  222. weekOfYear                 ds.w    1                ; offset: $12 (18)
  223. pm                         ds.w    1                ; offset: $14 (20)
  224. res1                     ds.w    1                ; offset: $16 (22)
  225. res2                     ds.w    1                ; offset: $18 (24)
  226. res3                     ds.w    1                ; offset: $1A (26)
  227.                          ORG 0
  228. list                     ds.w    14                ; offset: $0 (0)        ; Index by LongDateField!
  229.                          ORG 0
  230. eraAlt                     ds.w    1                ; offset: $0 (0)
  231. oldDate                     ds        DateTimeRec        ; offset: $2 (2)
  232.                          ORG 28
  233. sizeof                     EQU *                    ; size:   $1C (28)
  234.                         ENDR
  235. ; typedef SInt8                         DateDelta
  236.  
  237. TogglePB                RECORD 0
  238. togFlags                 ds.l    1                ; offset: $0 (0)        ; caller normally sets low word to dateStdMask=$7F
  239. amChars                     ds.l    1                ; offset: $4 (4)        ; from 'itl0', but uppercased
  240. pmChars                     ds.l    1                ; offset: $8 (8)        ; from 'itl0', but uppercased
  241. reserved                 ds.l    4                ; offset: $C (12)
  242. sizeof                     EQU *                    ; size:   $1C (28)
  243.                         ENDR
  244. ; typedef short                         ToggleResults
  245.  
  246.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  247.     ENDIF
  248. ;
  249. ; pascal void LongDateToSeconds(const LongDateRec *lDate, LongDateTime *lSecs)
  250. ;
  251.     IF ¨ GENERATINGCFM THEN
  252.         Macro
  253.         _LongDateToSeconds
  254.             move.l              #$8008FFF2,-(sp)
  255.             dc.w                $A8B5
  256.         EndM
  257.     ELSE
  258.         IMPORT_CFM_FUNCTION LongDateToSeconds
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal void LongSecondsToDate(LongDateTime *lSecs, LongDateRec *lDate)
  263. ;
  264.     IF ¨ GENERATINGCFM THEN
  265.         Macro
  266.         _LongSecondsToDate
  267.             move.l              #$8008FFF0,-(sp)
  268.             dc.w                $A8B5
  269.         EndM
  270.     ELSE
  271.         IMPORT_CFM_FUNCTION LongSecondsToDate
  272.     ENDIF
  273.  
  274. ;
  275. ; pascal ToggleResults ToggleDate(LongDateTime *lSecs, LongDateField field, DateDelta delta, short ch, const TogglePB *params)
  276. ;
  277.     IF ¨ GENERATINGCFM THEN
  278.         Macro
  279.         _ToggleDate
  280.             move.l              #$820EFFEE,-(sp)
  281.             dc.w                $A8B5
  282.         EndM
  283.     ELSE
  284.         IMPORT_CFM_FUNCTION ToggleDate
  285.     ENDIF
  286.  
  287. ;
  288. ; pascal short ValidDate(const LongDateRec *vDate, long flags, LongDateTime *newSecs)
  289. ;
  290.     IF ¨ GENERATINGCFM THEN
  291.         Macro
  292.         _ValidDate
  293.             move.l              #$820CFFE4,-(sp)
  294.             dc.w                $A8B5
  295.         EndM
  296.     ELSE
  297.         IMPORT_CFM_FUNCTION ValidDate
  298.     ENDIF
  299.  
  300. ;
  301. ; pascal Boolean IsMetric(void )
  302. ;
  303.     IF ¨ GENERATINGCFM THEN
  304.         Macro
  305.         _IsMetric
  306.             move.w              #$0004,-(sp)
  307.             dc.w                $A9ED
  308.         EndM
  309.     ELSE
  310.         IMPORT_CFM_FUNCTION IsMetric
  311.     ENDIF
  312.  
  313. ;
  314. ; pascal SysPPtr GetSysPPtr(void )
  315. ;
  316.     IF ¨ GENERATINGCFM THEN
  317.         Macro
  318.         _GetSysPPtr           &dest=(sp)
  319.             move.l            #$000001F8,&dest
  320.         EndM
  321.     ELSE
  322.         IMPORT_CFM_FUNCTION GetSysPPtr
  323.     ENDIF
  324.  
  325. ;
  326. ; pascal OSErr ReadDateTime(unsigned long *time)
  327. ;
  328.     IF ¨ GENERATINGCFM THEN
  329.         ; parameters:
  330.         ;    time            => A0
  331.         ; returns:
  332.         ;    OSErr           <= D0
  333.         _ReadDateTime:    OPWORD    $A039
  334.     ELSE
  335.         IMPORT_CFM_FUNCTION ReadDateTime
  336.     ENDIF
  337.  
  338. ;
  339. ; pascal void GetDateTime(unsigned long *secs)
  340. ;
  341.     IF ¨ GENERATINGCFM THEN
  342.         ; parameters:
  343.         ;    secs            => A0
  344.         Macro
  345.         _GetDateTime
  346.             move.l              $020C,(A0)
  347.         EndM
  348.     ELSE
  349.         IMPORT_CFM_FUNCTION GetDateTime
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal OSErr SetDateTime(unsigned long time)
  354. ;
  355.     IF ¨ GENERATINGCFM THEN
  356.         ; parameters:
  357.         ;    time            => D0
  358.         ; returns:
  359.         ;    OSErr           <= D0
  360.         _SetDateTime:    OPWORD    $A03A
  361.     ELSE
  362.         IMPORT_CFM_FUNCTION SetDateTime
  363.     ENDIF
  364.  
  365. ;
  366. ; pascal void SetTime(const DateTimeRec *d)
  367. ;
  368.     IF ¨ GENERATINGCFM THEN
  369.         ; parameters:
  370.         ;    d               => A0
  371.         Macro
  372.         _SetTime
  373.             dc.w                $A9C7
  374.             dc.w                $A03A
  375.         EndM
  376.     ELSE
  377.         IMPORT_CFM_FUNCTION SetTime
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal void GetTime(DateTimeRec *d)
  382. ;
  383.     IF ¨ GENERATINGCFM THEN
  384.         ; parameters:
  385.         ;    d               => A0
  386.         Macro
  387.         _GetTime
  388.             move.l              $020C,D0
  389.             dc.w                $A9C6
  390.         EndM
  391.     ELSE
  392.         IMPORT_CFM_FUNCTION GetTime
  393.     ENDIF
  394.  
  395. ;
  396. ; pascal void DateToSeconds(const DateTimeRec *d, unsigned long *secs)
  397. ;
  398.     IF ¨ GENERATINGCFM THEN
  399.         _DateToSeconds:    OPWORD    $A9C7
  400.     ELSE
  401.         IMPORT_CFM_FUNCTION DateToSeconds
  402.     ENDIF
  403.  
  404. ;
  405. ; pascal void SecondsToDate(unsigned long secs, DateTimeRec *d)
  406. ;
  407.     IF ¨ GENERATINGCFM THEN
  408.         ; parameters:
  409.         ;    secs            => D0
  410.         ;    d               => A0
  411.         _SecondsToDate:    OPWORD    $A9C6
  412.     ELSE
  413.         IMPORT_CFM_FUNCTION SecondsToDate
  414.     ENDIF
  415.  
  416.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  417. ;
  418. ; pascal OSErr DTInstall(DeferredTaskPtr dtTaskPtr)
  419. ;
  420.     IF ¨ GENERATINGCFM THEN
  421.         ; parameters:
  422.         ;    dtTaskPtr       => A0
  423.         ; returns:
  424.         ;    OSErr           <= D0
  425.         _DTInstall:    OPWORD    $A082
  426.     ELSE
  427.         IMPORT_CFM_FUNCTION DTInstall
  428.     ENDIF
  429.  
  430.     ENDIF
  431. ;
  432. ; pascal SInt8 GetMMUMode(void)
  433. ;
  434.     IF ¨ GENERATINGCFM THEN
  435.         Macro
  436.         _GetMMUMode           &dest=(sp)
  437.             move.b            $0CB2,&dest
  438.         EndM
  439.     ELSE
  440.         IMPORT_CFM_FUNCTION GetMMUMode
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal void SwapMMUMode(SInt8 *mode)
  445. ;
  446.     IF ¨ GENERATINGCFM THEN
  447.         ; parameters:
  448.         ;    mode            => A0
  449.         Macro
  450.         _SwapMMUMode
  451.             move.b              (A0),D0
  452.             dc.w                $A05D
  453.             move.b              D0,(A0)
  454.         EndM
  455.     ELSE
  456.         IMPORT_CFM_FUNCTION SwapMMUMode
  457.     ENDIF
  458.  
  459. ;
  460. ; pascal void Delay(long numTicks, long *finalTicks)
  461. ;
  462.     IF ¨ GENERATINGCFM THEN
  463.         _Delay:    OPWORD    $A03B
  464.     ELSE
  465.         IMPORT_CFM_FUNCTION Delay
  466.     ENDIF
  467.  
  468. ;
  469. ; pascal OSErr WriteParam(void )
  470. ;
  471.     IF ¨ GENERATINGCFM THEN
  472.         _WriteParam:    OPWORD    $A038
  473.     ELSE
  474.         IMPORT_CFM_FUNCTION WriteParam
  475.     ENDIF
  476.  
  477. ;
  478. ; pascal void Enqueue(QElemPtr qElement, QHdrPtr qHeader)
  479. ;
  480.     IF ¨ GENERATINGCFM THEN
  481.         ; parameters:
  482.         ;    qElement        => A0
  483.         ;    qHeader         => A1
  484.         _Enqueue:    OPWORD    $A96F
  485.     ELSE
  486.         IMPORT_CFM_FUNCTION Enqueue
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal OSErr Dequeue(QElemPtr qElement, QHdrPtr qHeader)
  491. ;
  492.     IF ¨ GENERATINGCFM THEN
  493.         ; parameters:
  494.         ;    qElement        => A0
  495.         ;    qHeader         => A1
  496.         ; returns:
  497.         ;    OSErr           <= D0
  498.         _Dequeue:    OPWORD    $A96E
  499.     ELSE
  500.         IMPORT_CFM_FUNCTION Dequeue
  501.     ENDIF
  502.  
  503. ;
  504. ; pascal OSErr InitUtil(void )
  505. ;
  506.     IF ¨ GENERATINGCFM THEN
  507.         ; returns:
  508.         ;    OSErr           <= D0
  509.         _InitUtil:    OPWORD    $A03F
  510.     ELSE
  511.         IMPORT_CFM_FUNCTION InitUtil
  512.     ENDIF
  513.  
  514.     IF GENERATINGPOWERPC THEN
  515. ;
  516. ; pascal void MakeDataExecutable(void *baseAddress, unsigned long length)
  517. ;
  518.     IF GENERATINGCFM THEN
  519.         IMPORT_CFM_FUNCTION MakeDataExecutable
  520.     ENDIF
  521.  
  522.     ENDIF
  523.     IF GENERATING68K THEN
  524. ;
  525. ; pascal Boolean SwapInstructionCache(Boolean cacheEnable)
  526. ;
  527.     IF ¨ GENERATINGCFM THEN
  528.         Macro
  529.         _SwapInstructionCache
  530.             moveq               #0,D0
  531.             dc.w                $A098
  532.         EndM
  533.     ELSE
  534.         IMPORT_CFM_FUNCTION SwapInstructionCache
  535.     ENDIF
  536.  
  537. ;
  538. ; pascal void FlushInstructionCache(void )
  539. ;
  540.     IF ¨ GENERATINGCFM THEN
  541.         Macro
  542.         _FlushInstructionCache
  543.             moveq               #1,D0
  544.             dc.w                $A098
  545.         EndM
  546.     ELSE
  547.         IMPORT_CFM_FUNCTION FlushInstructionCache
  548.     ENDIF
  549.  
  550. ;
  551. ; pascal Boolean SwapDataCache(Boolean cacheEnable)
  552. ;
  553.     IF ¨ GENERATINGCFM THEN
  554.         Macro
  555.         _SwapDataCache
  556.             moveq               #2,D0
  557.             dc.w                $A098
  558.         EndM
  559.     ELSE
  560.         IMPORT_CFM_FUNCTION SwapDataCache
  561.     ENDIF
  562.  
  563. ;
  564. ; pascal void FlushDataCache(void )
  565. ;
  566.     IF ¨ GENERATINGCFM THEN
  567.         Macro
  568.         _FlushDataCache
  569.             moveq               #3,D0
  570.             dc.w                $A098
  571.         EndM
  572.     ELSE
  573.         IMPORT_CFM_FUNCTION FlushDataCache
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal void FlushCodeCache(void )
  578. ;
  579.     IF ¨ GENERATINGCFM THEN
  580.         _FlushCodeCache:    OPWORD    $A0BD
  581.     ELSE
  582.         IMPORT_CFM_FUNCTION FlushCodeCache
  583.     ENDIF
  584.  
  585. ;
  586. ; pascal void FlushCodeCacheRange(void *address, unsigned long count)
  587. ;
  588.     IF ¨ GENERATINGCFM THEN
  589.         ; parameters:
  590.         ;    address         => A0
  591.         ;    count           => A1
  592.         Macro
  593.         _FlushCodeCacheRange
  594.             moveq               #9,D0
  595.             dc.w                $A098
  596.         EndM
  597.     ELSE
  598.         IMPORT_CFM_FUNCTION FlushCodeCacheRange
  599.     ENDIF
  600.  
  601. ;
  602. ; pascal void FlushExternalCache(void )
  603. ;
  604.     IF ¨ GENERATINGCFM THEN
  605.         Macro
  606.         _FlushExternalCache
  607.             moveq               #6,D0
  608.             dc.w                $A098
  609.         EndM
  610.     ELSE
  611.         IMPORT_CFM_FUNCTION FlushExternalCache
  612.     ENDIF
  613.  
  614.     ENDIF
  615. ;
  616. ; pascal void ReadLocation(MachineLocation *loc)
  617. ;
  618.     IF ¨ GENERATINGCFM THEN
  619.         ; parameters:
  620.         ;    loc             => A0
  621.         Macro
  622.         _ReadLocation
  623.             move.l              #$000C00E4,D0
  624.             dc.w                $A051
  625.         EndM
  626.     ELSE
  627.         IMPORT_CFM_FUNCTION ReadLocation
  628.     ENDIF
  629.  
  630. ;
  631. ; pascal void WriteLocation(const MachineLocation *loc)
  632. ;
  633.     IF ¨ GENERATINGCFM THEN
  634.         ; parameters:
  635.         ;    loc             => A0
  636.         Macro
  637.         _WriteLocation
  638.             move.l              #$000C00E4,D0
  639.             dc.w                $A052
  640.         EndM
  641.     ELSE
  642.         IMPORT_CFM_FUNCTION WriteLocation
  643.     ENDIF
  644.  
  645.     IF OLDROUTINENAMES THEN
  646.     ENDIF
  647.     IF OLDROUTINELOCATIONS THEN
  648. ;  Environs Equates 
  649.  
  650. curSysEnvVers                    EQU        2                    ;Updated to equal latest SysEnvirons version
  651. SysEnvRec                RECORD 0
  652. environsVersion             ds.w    1                ; offset: $0 (0)
  653. machineType                 ds.w    1                ; offset: $2 (2)
  654. systemVersion             ds.w    1                ; offset: $4 (4)
  655. processor                 ds.w    1                ; offset: $6 (6)
  656. hasFPU                     ds.b    1                ; offset: $8 (8)
  657. hasColorQD                 ds.b    1                ; offset: $9 (9)
  658. keyBoardType             ds.w    1                ; offset: $A (10)
  659. atDrvrVersNum             ds.w    1                ; offset: $C (12)
  660. sysVRefNum                 ds.w    1                ; offset: $E (14)
  661. sizeof                     EQU *                    ; size:   $10 (16)
  662.                         ENDR
  663.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  664. ;
  665. ; pascal OSErr SysEnvirons(short versionRequested, SysEnvRec *theWorld)
  666. ;
  667.     IF ¨ GENERATINGCFM THEN
  668.         ; parameters:
  669.         ;    versionRequetheWorld=> D0
  670.         ;    theWorld        => A0
  671.         ; returns:
  672.         ;    OSErr           <= D0
  673.         _SysEnvirons:    OPWORD    $A090
  674.     ELSE
  675.         IMPORT_CFM_FUNCTION SysEnvirons
  676.     ENDIF
  677.  
  678.     ENDIF
  679.     ENDIF
  680.     ENDIF ; __OSUTILS__ 
  681.  
  682.